import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter/foundation.dart';

class Categories extends ChangeNotifier {
  int total = 0;
  int favorite = 0;
  int movie = 0;
  int tv = 0;
  int video = 0;

  void update(Map<String, dynamic> sums) {
    total = sums['total'] as int? ?? 0;
    favorite = sums['favorite'] as int? ?? 0;
    movie = sums['movie'] as int? ?? 0;
    tv = sums['tv'] as int? ?? 0;
    video = sums['video'] as int? ?? 0;
    notifyListeners();
  }

  void clear() {
    total = 0;
    favorite = 0;
    movie = 0;
    tv = 0;
    video = 0;
    notifyListeners();
  }
}
